import styles from './CardImage.module.css';
import Card from "../types/Card";

export interface CardImageProps {
    card: Card;
}

export default function CardImage(props: CardImageProps) {
    let {card} = props;

    let shortTitle = card.value.shortTitle + card.suit.shortTitle;
    let title = card.value.title + ' of ' + card.suit.title;

    return (
        <img
            className={styles.cardImage}
            src={card.image}
            alt={shortTitle}
            title={title}
        />
    );
}
